package StudyCode.summary.mycollection;

import java.util.ArrayList;
import java.util.Collections;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingCollectionsCopyMethod {
	public static void main(String[] args) {
		ArrayList<String> arrayList = new ArrayList<>();
		arrayList.add("A");
		arrayList.add("B");
		arrayList.add("C");

		ArrayList<String> arrayList1 = new ArrayList<>();
		arrayList1.add("1");
		arrayList1.add("2");
		arrayList1.add("3");
		System.out.println("复制前，ArrayList 元素:" + arrayList1);
		Collections.copy(arrayList1, arrayList);
		System.out.println("复制后，ArrayList 元素:" + arrayList1);
	}
}
